﻿using System;
using System.Web;
using System.ComponentModel;
using System.Data;

namespace ErpServer
{
    public class UserLogin
    {
        /// <summary>
        /// 检测是否登陆成功
        /// </summary>
        /// <returns>成功登陆返回true,未成功返回false</returns>
        public static bool LoginCheck(string userName, string passwd)
        {
            if (userName == "")
                return false;
            string sql = "select AdminPassword from tb_Admin where AdminName = '" + userName + "'";
            DBConnection co = new DBConnection();
            string re = co.GetString(sql);
            if ( re == passwd )
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}